<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <p id="content"></p>
    
    <script>
        var p_tag = document.querySelector("#content");
        var obj = {
            _content: "内容1"
        };

        p_tag.innerHTML = obj._content;

        Object.defineProperty(obj, "content", {
            set: function(val){
                this._content = val;
                p_tag.innerHTML = val;
            }
        })
    </script>
</body>
</html>